<?php

namespace app\admin\controller;

use app\common\controller\AdminBaseController;

class PhotoController extends AdminBaseController
{
    protected function initialize()
    {
        parent::initialize();
        $this->server = model('server.photo');
    }

    public function getPhotoListPageOp()
    {
        $requestData = validateRequestParam('admin', 'getListPage');
        $responseData['meta'] = ['code' => 1, 'msg' => lang('GET_SUCCESS')];
        $responseData['data'] = $this->server->getListPage($requestData);

        return $responseData;
    }

    public function getPhotoInfoOp()
    {
        $postData = input();
        $responseData['meta'] = [
            'code' => 1,
            'msg' => '获取成功',
        ];
        $responseData['data'] = $this->server->getPhotoInfo($postData);

        return $responseData;
    }
}
